<?php 
$categoria_padre=null;
$this->headScript()
        ->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.core.js")
        ->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.widget.js")
		->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.datepicker.js")
		->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/i18n/jquery.ui.datepicker-es.js")
		->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.position.js")
		->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.mouse.js")
		->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.draggable.js")
		->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.droppable.js")
		->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.resizable.js")
		->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.dialog.js")
		->appendFile($this->baseUrl()."/js/functions/admin-functions.js")
		->appendFile($this->baseUrl()."/js/jquery/plugins/jwysiwyg/jquery.wysiwyg.js");
$this->headTitle('Nuevo Producto');

$this->headLink()->appendStylesheet($this->baseUrl(). '/js/jquery/development-bundle/themes/base/jquery.ui.all.css');
$this->headLink()->appendStylesheet($this->baseUrl(). '/js/jquery/plugins/jwysiwyg/jquery.wysiwyg.css', "screen");

if(is_array($this->TreeCat)){
	foreach($this->TreeCat AS $tree){
		$categoria_padre .= "&nbsp;".$tree['Category'] ."&nbsp;/";
	}
}
$parent=$this->CatParent;
?>

<script type="text/javascript">
	jQuery(function() {
		jQuery.datepicker.setDefaults( jQuery.datepicker.regional["es"] );
		jQuery( "#product_date_avaliable" ).datepicker({ minDate: -1, maxDate: "+6M +10D", dateFormat: 'yy-mm-dd' });
		
	});
</script>
<script language="javascript"><!--
var tax_rates = new Array();

<?php 
if(!empty($this->Taxes)) {
	foreach($this->Taxes as $tax){
?>
tax_rates["<?php echo $tax['Id'];?>"] = <?php echo (int) $tax['Percent']; ?>;
<?php	
	}
}?>

function doRound(x, places) {
  return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);
}

function getTaxRate() {
  var selected_value = document.forms["addproduct"].product_tax_class_id.selectedIndex;
  var parameterVal = document.forms["addproduct"].product_tax_class_id[selected_value].value;

  if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) {
    return tax_rates[parameterVal];
  } else {
    return 0;
  }
}

function updateGross() {
  var taxRate = getTaxRate();
  var grossValue = document.forms["addproduct"].product_price.value;

  if (taxRate > 0) {
    grossValue = grossValue * ((taxRate / 100) + 1);
  }

  document.forms["addproduct"].product_price_gross.value = doRound(grossValue, 2);
}

function updateNet() {
  var taxRate = getTaxRate();
  var netValue = document.forms["addproduct"].product_price_gross.value;

  if (taxRate > 0) {
    netValue = netValue / ((taxRate / 100) + 1);
  }

  document.forms["addproduct"].products_price.value = doRound(netValue, 4);
}

//--></script>

<div class="section">
<div class="section_inner">
<p class="errorText">&nbsp;<?php echo $this->messageError; ?></p>
<div class="title_wrapper">
	<h2>Agregar productos</h2>
</div>
<div class="section_content">

    <form action="<?php echo $this->escape($this->form->getAction()); ?>/catParent/<?php echo $parent;?>/"  method="<?php echo $this->escape($this->form->getMethod()); ?>" id="<?php echo $this->escape($this->form->getName()); ?>" name="<?php echo $this->escape($this->form->getName()); ?>"  enctype="<?php echo $this->escape($this->form->getEnctype()); ?>">
	<input type="hidden" name="product_id" value="<?php echo (isset($this->ProductInfo['Id'])) ? $this->ProductInfo['Id'] : 0;?>" />
	<input type="hidden" name="product_category_id" value="<?php echo (isset($this->ProductInfo['Product_Category_Id'])) ? $this->ProductInfo['Product_Category_Id'] : $parent; ?>" />
	
 	<table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading">Producto en Categoría: &quot;/<?php echo $categoria_padre; ?>&quot;</td>
            <td class="pageHeading" align="right">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="57" height="40">
            </td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td>
        	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="1" height="10">
        </td>
      </tr>
      <tr>
        <td class="main" align="right">
        	<a href="<?php echo $this->baseUrl(); ?>/admin/categories/index/Id/<?php echo $this->CatInfo['Id'];?>/">
        		<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/button_cancel.gif" border="0" alt="Cancelar" title=" Cancelar ">
        	</a>
        </td>
      </tr>

      <tr>
        <td><table border="0" cellspacing="0" cellpadding="2">

          <tr>
            <td colspan="2"><img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="100%" height="2"></td>
            <td colspan="2" class="main" align="center"></td>
          </tr>

          <tr>
            <td class="main">Estado del Producto:</td>
            <td class="main">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            	<input type="radio" name="product_status" value="1" <?php echo ($this->ProductInfo['Product_Status']==1 ) ? 'checked="checked"' : ''; ?> />&nbsp;En stock&nbsp;
            	<input type="radio" name="product_status" value="0" <?php echo ($this->ProductInfo['Product_Status']==0 ) ? 'checked="checked"' : ''; ?> />&nbsp;Sin stock</td>
          </tr>
          <tr>
            <td class="main">Fecha de Disponibilidad:<br /><small>(YYYY-MM-DD)</small></td>
            <td class="main"><img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            	<input type="text" id="product_date_avaliable" name="product_date_avaliable" value="<?php echo (isset($this->ProductInfo['Product_Date_Avaliable'])) ? $this->ProductInfo['Product_Date_Avaliable'] : @date("Y-m-d"); ?>" />
            </td>
          </tr>

          <tr>
            <td class="main">Fabricante del producto:</td>
            <td class="main"><img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            	<select rel="dropdown" name="product_manufacturer_id">
					<option value="0" <?php echo (!isset($this->ProductInfo['Product_Manufacturer_Id']) || $this->ProductInfo['Product_Manufacturer_Id']==0 ) ? 'selected="selected"' : ''; ?>>--ninguno--</option>
					<?php foreach($this->Manufacturers as $manufacturer){ ?>
					<option value="<?php echo $manufacturer['Id']; ?>"  <?php echo (isset($this->ProductInfo['Product_Manufacturer_Id']) && $this->ProductInfo['Product_Manufacturer_Id'] == $manufacturer['Id']) ? 'selected="selected"' : ''; ?>><?php echo $manufacturer['Manufacturer']; ?></option>
					<?php } ?>
				</select>
			</td>
          </tr>
          <tr>
            <td class="main">Nombre del producto:</td>
            <td class="main">&nbsp;<input type="text" name="product_name" value="<?php echo (isset($this->ProductInfo['Product_Name'])) ? $this->ProductInfo['Product_Name'] : ''; ?>" size = "51" maxlength= "42" /></td>
          </tr>

          <tr bgcolor="#ebebff">
            <td class="main">Clase de Impuesto:</td>
            <td class="main">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            	<select rel="dropdown" name="product_tax_class_id" onchange="updateGross()">
				<option value="0" <?php echo (!isset($this->ProductInfo['Product_Tax_Class_Id']) || $this->ProductInfo['Product_Tax_Class_Id'] == 0) ? 'selected="selected"' : '' ; ?> >--ninguno--</option>
				<?php 
				if(!empty($this->Taxes)) {
					foreach($this->Taxes as $tax){
				?>
				<option value="<?php echo $tax['Id'];?>" <?php echo (isset($this->ProductInfo['Product_Tax_Class_Id']) && $this->ProductInfo['Product_Tax_Class_Id']==$tax['Id'] ) ? 'selected="selected"' : '' ; ?> ><?php echo $tax['Name']; ?></option>
				<?php	
					}
				}?>
				
				</select>
			</td>

          </tr>
          <tr bgcolor="#ebebff">
            <td class="main">Precio del producto (Neto):</td>
            <td class="main"><img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            <input type="text" name="product_price" value="<?php echo (isset($this->ProductInfo['Product_Price'])) ? number_format($this->ProductInfo['Product_Price'], 2, '.', '') : 0.00; ?>" onKeyUp="updateGross()" /></td>
          </tr>
          <tr bgcolor="#ebebff">
            <td class="main">Precio del producto (Bruto):</td>
            <td class="main">
            <img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            <input type="text" name="product_price_gross" value="<?php echo (isset($this->ProductInfo['Product_Price_Gross'])) ? $this->ProductInfo['Product_Price_Gross'] : 0; ?>" OnKeyUp="updateNet()" /></td>

          </tr>
          <tr>
            <td class="main">El Producto es Virtual:</td>
            <td class="main">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            	<input type="radio" name="product_virtual" value="1" <?php echo (isset($this->ProductInfo['Product_Virtual']) && $this->ProductInfo['Product_Virtual']==1 ) ? 'checked="checked"' : ''; ?> />&nbsp;Sí, no hace falta la Dirección de Envío&nbsp;
            	<input type="radio" name="product_virtual" value="0" <?php echo (!isset($this->ProductInfo['Product_Virtual']) || $this->ProductInfo['Product_Virtual']==0 ) ? 'checked="checked"' : ''; ?> />&nbsp;No, hace falta la Dirección de Envío
            </td>
          </tr>
          <tr>
            <td colspan="2"><img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="1" height="10"></td>
          </tr>
          <tr>
            <td class="main" valign="top">Envío Gratis Siempre:</td>
            <td class="main" valign="top">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            	<input type="radio" name="product_is_always_free_shipping" value="1" <?php echo ($this->ProductInfo['Product_Is_Always_Free_Shipping']==1 ) ? 'checked="checked"' : ''; ?> />&nbsp;Sí, Envío Gratis Siempre&nbsp;
            	<input type="radio" name="product_is_always_free_shipping" value="0" <?php echo ($this->ProductInfo['Product_Is_Always_Free_Shipping']==0 ) ? 'checked="checked"' : ''; ?>" />&nbsp;No, Reglas Normales de Envío<br />
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            	<input type="radio" name="product_is_always_free_shipping" value="2" <?php echo ($this->ProductInfo['Product_Is_Always_Free_Shipping']==2 ) ? 'checked="checked"' : ''; ?> />&nbsp;Especial, Producto/Descarga Combinación requieren la dirección de envío
            </td>

          </tr>

          <tr>
            <td colspan="2"><img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="1" height="10"></td>
          </tr>
          <tr>
            <td class="main">Recuadro de Cantidad del Producto:</td>
            <td class="main">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
           		<input type="radio" name="products_qty_box_status" value="1" <?php echo ($this->ProductInfo['Product_Qty_Box_Status']=="1" ) ? 'checked="checked"' : ''; ?> checked="checked" />&nbsp;Sí, mostrar recuadro de cantidad&nbsp;
           		<input type="radio" name="products_qty_box_status" value="0" <?php echo ($this->ProductInfo['Product_Qty_Box_Status']=="0" ) ? 'checked="checked"' : ''; ?> />&nbsp;No, no mostrar recuadro de cantidad
           	</td>
          </tr>

          <tr>
            <td colspan="2">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="1" height="10">
            </td>
          </tr>

          <tr>
            <td class="main">Cdad. Mín. del Producto:</td>
            <td class="main">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            	<input type="text" name="product_quantity_order_min" value="<?php echo (isset($this->ProductInfo['Product_Quantity_Order_Min'])) ? $this->ProductInfo['Product_Quantity_Order_Min'] : 1; ?>" />
            </td>
          </tr>

          <tr>
            <td class="main">Cdad. Máx. del Producto:</td>
            <td class="main"><img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            <input type="text" name="product_quantity_order_max" value="<?php echo (isset($this->ProductInfo['Product_Quantity_Order_Max'])) ? $this->ProductInfo['Product_Quantity_Order_Max'] : 0; ?>" />&nbsp;&nbsp;0 = Ilimitada, 1 = Sin Recuadro de Cantidad ni Máximo</td>
          </tr>

          <tr>
            <td class="main">Cdad. de Unidades del Producto:</td>

            <td class="main"><img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            <input type="text" name="product_quantity_order_units" value="<?php echo (isset($this->ProductInfo['Product_Quantity_order_Units'])) ? $this->ProductInfo['Product_Quantity_Order_Units'] : 1; ?>" /></td>
          </tr>

          <tr>
            <td colspan="2"><img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="1" height="10"></td>
          </tr>

          <tr>
            <td class="main" valign="top">Ficha tecnica del producto:</td>
            <td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="main" width="25" valign="top">&nbsp;</td>
                <td class="main" width="100%">
        			<textarea name="product_datasheet" id="product_datasheet" wrap="soft" style="width: 600px" rows="10"><?php echo (isset($this->ProductInfo['Product_Datasheet'])) ? $this->ProductInfo['Product_Datasheet'] : '';?></textarea>
        		</td>
              </tr>
            </table></td>
          </tr>
                    <tr>
            <td class="main" valign="top">Descripción del producto:</td>
            <td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="main" width="25" valign="top">&nbsp;</td>
                <td class="main" width="100%">
        			<textarea name="product_description" id="product_description" wrap="soft" style="width: 600px" rows="15"><?php echo (isset($this->ProductInfo['Product_Description'])) ? $this->ProductInfo['Product_Description'] : '';?></textarea>
        		</td>
              </tr>
            </table></td>
          </tr>

          <tr>
            <td colspan="2"><img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="1" height="10"></td>
          </tr>
          <tr>
            <td class="main">Cantidad de productos:</td>
            <td class="main">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            	<input type="text" name="product_quantity" value="<?php echo (isset($this->ProductInfo['Product_Quantity'])) ? $this->ProductInfo['Product_Quantity'] : 1;?>" /></td>
          </tr>
          <tr>
            <td class="main">Etiquetas (separadas por comas):</td>
            <td class="main">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            	<input type="text" name="product_tags" value="<?php echo (isset($this->ProductInfo['Product_Tags'])) ? $this->ProductInfo['Product_Tags'] : '';?>" size = "33" maxlength = "250" /></td>
          </tr>
          <tr>

            <td colspan="2"><img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="1" height="10"></td>
          </tr>
          <tr>
            <td class="main">Modelo del producto:</td>
            <td class="main">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            	<input type="text" name="product_model" size = "33" maxlength = "32" value="<?php echo (isset($this->ProductInfo['Product_Model'])) ? $this->ProductInfo['Product_Model'] : '';?>" /></td>
          </tr>
          <tr>
            <td colspan="2">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_black.gif" border="0" alt="" width="100%" height="3">
            </td>
          </tr>

          <tr>
            <td class="main" colspan="2">
            	<table width="100%" border="0" cellspacing="0" cellpadding="0">
              		<tr>
		                <td class="main">Imagen del documento:</td>
		                <td class="main">
		                	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15" />&nbsp;
		                	<?php echo $this->form->product_image; ?>&nbsp;
		                </td>
					</tr>
            	</table>
            </td>
          </tr>
          <tr>
          	<td class="main" colspan="2">
<?php if(!empty($this->ProductInfo['AllImagesByProduct'])) { ?>				          
				<div class="demo ui-widget ui-helper-clearfix">
				
				<ul id="gallery" class="gallery ui-helper-reset ui-helper-clearfix">
<?php foreach($this->ProductInfo['AllImagesByProduct'] as $imgs ){ ?>				
					<li class="ui-widget-content ui-corner-tr" id="<?php echo $imgs['IdImage']; ?>">
						<h5 class="ui-widget-header"><?php echo $this->ProductInfo['Product_Name'];?></h5>
				
						<img src="<?php echo $this->baseUrl(); ?>/images/files/product/Mini_Thumb/<?php echo $imgs['MiniThumb'] ;?>" alt="<?php echo $this->ProductInfo['Product_Name'];?>" width="96" height="72" />
						<a href="<?php echo $this->baseUrl(); ?>/images/files/product/Medium/<?php echo $imgs['Medium'] ;?>" title="View larger image" class="ui-icon ui-icon-zoomin">View larger</a>
						<a href="link/to/trash/script/when/we/have/js/off" title="Delete this image" class="ui-icon ui-icon-trash">Delete image</a>
					</li>
<?php } ?>					
				</ul>
				
				<div id="trash" class="ui-widget-content ui-state-default">
					<h4 class="ui-widget-header"><a href="#"><span class="ui-icon ui-icon-trash">Trash</span> Trash</a></h4>
				</div>
				
				</div>    
<?php } ?>				
				      	
          	</td>
          </tr>

          <tr>
            <td colspan="2">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_black.gif" border="0" alt="" width="100%" height="3">
            </td>
          </tr>

          <tr>
            <td class="main">URL del documento:<br /><small><small>(sin http://)</small></small></td>
            <td class="main">&nbsp;<input type="text" name="product_url" size = "51" maxlength= "255" value="<?php echo (isset($this->ProductInfo['Product_Url'])) ? $this->ProductInfo['Product_Url'] : '';?>" /></td>
          </tr>

          <tr>
            <td colspan="2">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="1" height="10">
            </td>
          </tr>
          <tr>
            <td class="main">Peso del producto:</td>

            <td class="main">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            	<input type="text" name="product_weight" value="<?php echo (isset($this->ProductInfo['Product_Weight'])) ? $this->ProductInfo['Product_Weight'] : 0;?>" />
            </td>
          </tr>
          <tr>
            <td class="main">Dimensiones del producto:</td>

            <td class="main">
            	<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="24" height="15">&nbsp;
            	<input type="text" name="product_size" value="<?php echo (isset($this->ProductInfo['Product_Size'])) ? $this->ProductInfo['Product_Size'] : '';?>" />
            </td>
          </tr>
          <tr>
            <td colspan="2"><img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="1" height="10"></td>
          </tr>

        </table></td>
      </tr>
      <tr>
        <td><img src="<?php echo $this->baseUrl(); ?>/css/admin/images/pixel_trans.gif" border="0" alt="" width="1" height="10"></td>
      </tr>
      <tr>
        <td class="main" align="right">
        	<input type="image" src="<?php echo $this->baseUrl();?>/css/admin/images/button_save.gif" border="0" alt="Guardar" title=" Guardar " />
        	<a href="<?php echo $this->baseUrl(); ?>/admin/categories/index/Id/<?php echo $this->CatInfo['Id'];?>/">
        		<img src="<?php echo $this->baseUrl(); ?>/css/admin/images/button_cancel.gif" border="0" alt="Cancelar" title=" Cancelar ">
        	</a>
        </td>
      </tr>

    </table></form>
    <style type="text/css">
		#gallery { float: left; width: 65%; min-height: 12em; } * html #gallery { height: 12em; } /* IE6 */
		.gallery.custom-state-active { background: #eee; }
		.gallery li { float: left; width: 96px; padding: 0.4em; margin: 0 0.4em 0.4em 0; text-align: center; }
		.gallery li h5 { margin: 0 0 0.4em; cursor: move; }
		.gallery li a { float: right; }
		.gallery li a.ui-icon-zoomin { float: left; }
		.gallery li img { width: 100%; cursor: move; }
	
		#trash { float: right; width: 32%; min-height: 18em; padding: 1%;} * html #trash { height: 18em; } /* IE6 */
		#trash h4 { line-height: 16px; margin: 0 0 0.4em; }
		#trash h4 .ui-icon { float: left; }
		#trash .gallery h5 { display: none; }
	</style>
</div>
</div>
</div>
<script type="text/javascript">
<!--
updateGross();
//-->
</script>
<script type="text/javascript">
$(document).ready(function(){
  $('#product_description, #product_datasheet').wysiwyg({
    controls: {
      strikeThrough : { visible : true },
      underline     : { visible : true },
      
      separator00 : { visible : true },
      
      justifyLeft   : { visible : true },
      justifyCenter : { visible : true },
      justifyRight  : { visible : true },
      justifyFull   : { visible : true },
      
      separator01 : { visible : true },
      
      indent  : { visible : true },
      outdent : { visible : true },
      
      separator02 : { visible : false },
      
      subscript   : { visible : false },
      superscript : { visible : false },
      
      separator03 : { visible : false },
      
      undo : { visible : false },
      redo : { visible : false },
      
      separator04 : { visible : false },
      
      insertOrderedList    : { visible : false },
      insertUnorderedList  : { visible : false },
      insertHorizontalRule : { visible : false },
      
      h4mozilla : { visible : true && $.browser.mozilla, className : 'h4', command : 'heading', arguments : ['h4'], tags : ['h4'], tooltip : "Header 4" },
      h5mozilla : { visible : true && $.browser.mozilla, className : 'h5', command : 'heading', arguments : ['h5'], tags : ['h5'], tooltip : "Header 5" },
      h6mozilla : { visible : true && $.browser.mozilla, className : 'h6', command : 'heading', arguments : ['h6'], tags : ['h6'], tooltip : "Header 6" },
      
      h4 : { visible : true && !( $.browser.mozilla ), className : 'h4', command : 'formatBlock', arguments : ['<H4>'], tags : ['h4'], tooltip : "Header 4" },
      h5 : { visible : true && !( $.browser.mozilla ), className : 'h5', command : 'formatBlock', arguments : ['<H5>'], tags : ['h5'], tooltip : "Header 5" },
      h6 : { visible : true && !( $.browser.mozilla ), className : 'h6', command : 'formatBlock', arguments : ['<H6>'], tags : ['h6'], tooltip : "Header 6" },
      
      separator07 : { visible : false },
      
      cut   : { visible : false },
      copy  : { visible : false },
      paste : { visible : false }
    }
  });
});
    </script>

    